package com.dashan.module.login;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.dashan.module.libbase.model.User;
import com.dashan.module.librouter.Router;

@Route(path = "/login/LoginActivity")
public class LoginActivity extends AppCompatActivity {

    private static final String TAG = LoginActivity.class.getSimpleName();

    @Autowired
    long key1;

    @Autowired(name = "key2")
    String anoName;

    @Autowired
    User data;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        //Arouter注入
        ARouter.getInstance().inject(this);
        Log.d(TAG, "key1 ==> " + key1);
        Log.d(TAG, "key2 ==> " + anoName);
        Log.d(TAG, "data ==> " + data.getUserName());
    }

    public void onClickView(View view) {
        Log.d(TAG, "you click");
        //Router.getInstance().startActivity(this, "/main/MainActivity");
        ARouter.getInstance().build("/main/MainActivity").navigation();
    }
}